/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bm.util;

import java.io.IOException;
import java.util.Map;

/**
 *
 * @author it6
 */
public class PropertiesHandler {

    private final PropertiesLoader propertiesLoader;
    private static Map properties;

    public PropertiesHandler() throws IOException {
        propertiesLoader = new PropertiesLoader("config.properties");
        properties = propertiesLoader.getProperties();
    }

    public String getIdModul() {
        return String.valueOf(properties.get("idmodul"));
    }
    
    public String getIP() {
        return String.valueOf(properties.get("ipserver"));
    }

    public int getPorts() {
        return Integer.valueOf(String.valueOf(properties.get("port")));
    }

    public String getrootDirectory() {
        return String.valueOf((properties.get("rootDirektori")));
    }

    public String getServerDbPassword() {
        return String.valueOf((properties.get("password")));
    }

    public String getServerDbHost() {
        return String.valueOf((properties.get("host")));
    }

    public String getServerDbName() {
        return String.valueOf((properties.get("database")));
    }

    public String getServerDbUsername() {
        return String.valueOf((properties.get("username")));
    }

    public String getIncomingInterval() {
        return String.valueOf((properties.get("TICheckIncoming")));
    }

    public String getOutboxInterval() {
        return String.valueOf((properties.get("TICheckOutbox")));
    }

    public String getSentInterval() {
        return String.valueOf((properties.get("TICheckSent")));
    }

    public String getDeleteTrashInterval() {
        return String.valueOf((properties.get("TIdeleteTrash")));
    }

    public String getMoveFailedInterval() {
        return String.valueOf((properties.get("TImoveFailed")));
    }

    public String getMoveBufferInterval() {
        return String.valueOf((properties.get("TImoveBuffer")));
    }

    public String getTerminateAppInterval() {
        return String.valueOf((properties.get("TIterminateApp")));
    }

    public int getLimitRowOutbox() {
        return Integer.valueOf(String.valueOf(properties.get("row_outbox")));
    }

    public int getMaksimumDataPerRequest() {
        return Integer.valueOf(String.valueOf(properties.get("maksimum_data_per_request")));
    }
    
    public int getMaksimumDataPerRequestOutbox() {
        return Integer.valueOf(String.valueOf(properties.get("maksimum_data_per_request_outbox")));
    }
    
    public String urlRequest() {
        return String.valueOf(properties.get("url_request"));
    }

}
